<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查询机器</title>
<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link  href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>

<div class="ricoh_content_k">
	<div class="ricoh_title">--- 查询机器 --- </div>
	<div class="ricoh_content_in">
   		<div class="find_k">
   		
   		  <form action="machine_listMachine.action" method="post">
           	<div class="find_kd">类别：
            	   <div style="height:30px;">
                
	                <input type="radio" name="category" class="category" id="radio" value="0" style="border:none"/>
	           	         <label style="width:8em; text-align:left">A4数码多功能机</label>
	                	
	                <input type="radio" name="category" class="category" id="radio" value="4" style="border:none"/>
	           	  		<label style="width:6em; text-align:left">数码印刷机</label>
	           	  		
	                <input type="radio" name="category" class="category" id="radio" value="6" style="border:none"/>
	           	  		<label style="width:6em; text-align:left">彩色复印机</label>
	           	  		
	           	  	<input type="radio" name="category" class="category" id="radio" value="5" style="border:none"/>
              			<label style="width:6em; text-align:left">传真机</label>
           	  	</div>
           	  	
           	  	<div>
           	  		<input type="radio" name="category" class="category" id="radio" value="1" style="border:none"/>
	                	<label style="width:8em; text-align:left">A3数码复合机</label> 
           	  	
           	  		<input type="radio" name="category" class="category" id="radio" value="2" style="border:none"/>
	           	  		<label style="width:6em; text-align:left">数码工程机</label>
                			
	                <input type="radio" name="category" class="category" id="radio" value="7" style="border:none"/>
	           	  		<label style="width:6em; text-align:left">打印机</label>
              			
              		<input type="radio" name="category" class="category" id="radio" value="3" style="border:none"/>
           	  			<label style="width:6em; text-align:left">模拟复印机</label>
           	 	</div>
           	</div>

            <p style="padding-top:2px; padding-left:50px;"><input type="submit" name="Submit" value="查询"  class="send_btn"/></p>
          </form>
       
        </div>
        <div class="find_result">
        <table class="result">
			<caption>查询结果：</caption>
			<thead>
				<tr>
					<th width="40%">品牌</th>
				    <th width="40%">机型</th>
				    <th width="40%">设计寿命</th>

				</tr>
			</thead>	
			<tfoot>
				<tr>
					<th>总共:${machines.totalCount}条记录</th>
					<td colspan="2">
						<h:pages currentPage="%{currentPage}" url="machine_listMachine.action" totalPage="%{totalPage}" cssClass="pagnation" showPageNumber="3">
							<s:param name="category" value="category"></s:param>
						</h:pages>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<s:iterator value="machines.data" status="machine">
					<s:if test="(#machine.index)%2==1">
						<tr >
							<th>${brand}</th>
							<th><a href="machine_viewMachine.action?machineId=${machineId}">${machineModel}</a></th>
							<td>${yearsOfLife}年 &nbsp;${sheetyOfLife}张</td>
						</tr>
					</s:if>
					<s:else>
						<tr class="odd">
							<th>${brand}</th>
							<th><a href="machine_viewMachine.action?machineId=${machineId}">${machineModel}</a></th>
							<td>${yearsOfLife}年 &nbsp;${sheetyOfLife}张</td>
						</tr>
					</s:else>
				</s:iterator>
			</tbody>		
		</table>
        </div>
  </div>
</div>

</div>
</div>

<jsp:include page="../footer.jsp"></jsp:include>

</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
ddtabmenu.definemenu("ddtabs2", 4);

</script>
</html>
